//
//  BaseAppDelegate.m
//  BaseCode
//
//  Created by 曹连华 on 2020/3/24.
//

#import "BaseAppDelegate.h"
#import "BaseVC.h"

@implementation BaseAppDelegate

#pragma mark - Getter & Setter
- (UIWindow *)window {
    if (!_window) {
        _window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
        _window.backgroundColor = [UIColor whiteColor];
        _window.rootViewController = [BaseVC new];
    }
    return _window;
}

- (UIWindow *)modalWindow {
    if (!_modalWindow) {
        _modalWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
        _modalWindow.backgroundColor = [UIColor clearColor];
        _modalWindow.windowLevel = UIWindowLevelNormal + 1;
        _modalWindow.rootViewController = [BaseVC new];
        [_modalWindow makeKeyAndVisible];
        _modalWindow.hidden = YES;
    }
    return _modalWindow;
}

- (UIWindow *)topWindow {
    if (!_topWindow) {
        _topWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
        _topWindow.backgroundColor = [UIColor clearColor];
        _topWindow.windowLevel = UIWindowLevelAlert + 1;
        _topWindow.rootViewController = [BaseVC new];
        [_topWindow makeKeyAndVisible];
        _topWindow.hidden = YES;
    }
    return _topWindow;
}

@end
